<?php require_once './connection.php'; ?>

<html>

    <?php
    $sql = 'SELECT * FROM students';
    $students = query($sql);
    ?>
    <table width="1200" border="0">
        <tr>
            <td width="50">ID</td>
            <td width="255">NAME</td>
            <td width="50">SEX</td>
            <td width="255">EMAIL</td>
            <td width="255">ADDRESS</td>
        </tr>
        
        
      </table>
    <?php foreach ($students as $student):?>
 
    
    <table width="1200" border="0">
        
        <tr>
            <td width="50"><?php echo $student['ID'] ?></td>
            <td width="255"><?php echo $student['NAME'] ?></td>
            <td width="50"><?php echo $student['SEX']?></td>
            <td width="255"><?php echo $student['EMAIL']?></td>
            <td width="255"><?php echo $student['ADDRESS']?></td>
        </tr>
        
      </table>
    <?php endforeach; ?>
</html>